@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --primary: #F59E0B; /* Industrial Gold */
    --primary-hover: #D97706;
    --secondary: #3B82F6; /* Electric Blue */
    --bg-dark: #0B1120;
    --bg-darker: #05080F;
    --bg-card: rgba(17, 24, 39, 0.7);
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --glass-bg: rgba(17, 24, 39, 0.4);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --navbar-bg: rgba(5, 8, 15, 0.9);
}

[data-theme="light"] {
    --primary: #D97706;
    --secondary: #2563EB;
    --bg-dark: #FAFAFA;
    --bg-darker: #F3F4F6;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-main: #111827;
    --text-muted: #4B5563;
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.05);
    --navbar-bg: rgba(255, 255, 255, 0.95);
}

[dir="rtl"] {
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

/* Typography */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: table;
    margin: 0 auto 3rem auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Layout Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Controls (Theme & Lang toggle) */
.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: 2rem;
}
[dir="rtl"] .nav-controls {
    margin-left: 0;
    margin-right: 2rem;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.lang-btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
    gap: 8px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background: var(--navbar-bg);
    backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

.nav-right-wrap {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 0.3rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}
[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .nav-right-wrap {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70vw;
        height: 100vh;
        background: var(--navbar-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        border-left: 1px solid var(--border-color);
    }
    
    [dir="rtl"] .nav-right-wrap {
        right: auto;
        left: -100%;
        border-left: none;
        border-right: 1px solid var(--border-color);
    }

    .nav-right-wrap.active {
        right: 0;
    }
    [dir="rtl"] .nav-right-wrap.active {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2rem;
    }

    .nav-controls {
        margin: 0;
        margin-top: 1rem;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }
}

/* Footer */
.footer {
    background: var(--bg-darker);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}
[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page Headers */
.page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(rgba(5, 8, 15, 0.8), rgba(11, 17, 32, 1));
    padding-top: 75px; /* Offset for fixed navbar */
    text-align: center;
    overflow: hidden;
}

.header-content {
    z-index: 2;
    padding: 2rem;
}

.header-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.header-subtitle {
    font-size: 1.25rem;
    color: var(--primary);
    max-width: 600px;
    margin: 0 auto;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Additions for specific pages */
[data-theme="light"] .item-featured {
    background-blend-mode: overlay;
    background-color: rgba(255,255,255,0.8) !important; 
}
[data-theme="light"] .item-featured h3 {
    color: #111827;
}
[data-theme="light"] .hero {
    background-blend-mode: overlay;
    background-color: rgba(255,255,255,0.7) !important;
}
[data-theme="light"] .hero-title, [data-theme="light"] .header-title {
    color: var(--text-main);
    background: none;
    -webkit-text-fill-color: initial;
}
[data-theme="light"] .page-header {
    background: linear-gradient(135deg, #F3F4F6, #FFFFFF);
    border-bottom: 1px solid var(--border-color);
}
